package com.biboheart.demo.report.controller;

import com.biboheart.demo.report.domain.ReportDomain;
import com.biboheart.demo.report.support.controller.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping(value = "demo")
public class DemoController {
    private final ReportDomain reportDomain;

    @RequestMapping(value = "test", method = {RequestMethod.POST, RequestMethod.GET})
    public ResponseResult<?> testSet() {
        return ResponseResult.ok(reportDomain.createReport());
    }
}
